import fetch from 'utils/fetch';
import Cookies from 'js-cookie';
//身份信息
export function getInfo(obj) {
  return fetch({
    url: '/api/admin/loanCommon/orderCusInfo',
    method: 'post',
    data: obj
  });
}
//紧急联系人
export function getContact(obj) {
  return fetch({
    url: '/api/admin/loanCommon/getContacts',
    method: 'post',
    data: obj
  })
}
//命中
export function getHit(obj) {
  return fetch({
    url: '/api/admin/loanCommon/hitCheck',
    method: 'post',
    data: obj
  })
}
//获取图片接口
export function getImg(obj) {
  return fetch({
    url: '/api/admin/loanCommon/getImgList',
    method: 'post',
    data: obj
  })
}
//获取客服认证信息
export function getCustomerInfo(obj) {
  return fetch({
    url: '/api/admin/loanCommon/getCustomerById',
    method: 'post',
    data: obj
  })
}
//获取设备信息
export function getAppInfo(obj) {
  return fetch({
    url: '/api/admin/loanCommon/getAppInfo',
    method: 'post',
    data: obj
  })
}
//审批接口
export function getApprOrder(obj) {
  return fetch({
    url: '/api/admin/loanCommon/apprOrder',
    method: 'post',
    data: obj
  })
}
//信审回显
export function getApproInfo(obj) {
  return fetch({
    url: '/api/admin/loanCommon/getApproInfo',
    method: 'post',
    data: obj
  })
}
//终审审批
export function finalApprovel(obj) {
  return fetch({
    url: '/api/admin/loanCommon/finalApprovel',
    method: 'post',
    data: obj
  })
}
//查看认证结果
export function getResultById(query) {
  return fetch({
    url: '/api/admin/loanCommon/advanceIdCheck',
    method: 'get',
    params: query
  })
}
//历史记录分页
export function hisPage(query) {
  return fetch({
    url: '/api/admin/loanOrderApplyTown/selectHistoryList',
    method: 'get',
    params: query
  });
}
//top20占通讯录百分比
export function getPercent(obj) {
  return fetch({
    url: '/api/admin/loanCommon/top20Percent',
    method: 'post',
    data: obj
  });
}
//GPS
export function resolveGps(obj) {
  return fetch({
    url: '/api/admin/loanCommon/resolveGps',
    method: 'post',
    data: obj
  });
}
//查看风控报告
export function riskReport(obj) {
  return fetch({
    url: '/api/admin/loanOrderApplyTown/riskReport',
    method: 'post',
    data: obj
  });
}
//电核状态
export function telephoneCheck(obj) {
  return fetch({
    url: '/api/admin/loanOrderApplyTown/telephoneCheck',
    method: 'get',
    params: obj
  })
}
//资料退回
export function orderBack(obj) {
  return fetch({
    url: '/api/admin/loanOrderApplyTown/orderBack',
    method: 'put',
    data: obj
  })
}
// 用户订单信息
export function userAllOrder(obj) {
  return fetch({
    url: '/api/admin/loanOrderApplyTown/userAllOrder',
    method: 'post',
    data: obj
  });
}
// 查看用户订单信息
export function userAllOrderByChannel(query) {
  return fetch({
    url: '/api/admin/loanOrderApplyTown/userAllOrderByChannel',
    method: 'get',
    params: query
  });
}
// 客户风控模型建议
export function getRiskEngineInfo(query) {
  return fetch({
    url: '/api/admin/loanOrderApplyTown/getRiskEngineInfo',
    method: 'get',
    params: query
  });
}
// 风控模型建议新
export function getModalAdvice(query) {
  return fetch({
    url: '/api/admin/loanCommon/getModalAdvice',
    method: 'get',
    params: query
  });
}
// APP标签
export function appAllChannel(obj) {
  return fetch({
    url: '/api/admin/loanOrderApplyTown/appAllChannel',
    method: 'post',
    data: obj
  });
}
// 标签列表
export function yinHangOrderPage(query) {
  return fetch({
    url: '/api/admin/loanOrderApplyTown/yinHangOrderPage',
    method: 'get',
    params: query
  });
}
// 上传补充图片
export function uploadImageBusiness(obj) {
  return fetch({
    url: '/api/admin/loanOrderApplyTown/uploadImageBusiness',
    method: 'post',
    data: obj
  });
}
// 上传图片
export function uploadImageDate(obj) {
  return fetch({
    url: '/api/admin/loanOrderApplyTown/uploadImageDate',
    method: 'post',
    data: obj
  });
}
// 手机号实名认证
export function teltIdCheckResult(query) {
  return fetch({
    url: '/api/admin/loanCommon/teltIdCheckResult',
    method: 'get',
    params: query
  });
}
// 身份证查看手机号
export function multiPhoneCheckResult(query) {
  return fetch({
    url: '/api/admin/loanCommon/multiPhoneCheckResult',
    method: 'get',
    params: query
  });
}
// 资料退回
export function reasonReturn(obj) {
  return fetch({
    url: '/api/admin/loanOrderApplyTown/reasonReturn',
    method: 'post',
    data: obj
  });
}
// 添加至黑名单
export function addBlackList(obj) {
  return fetch({
    url: '/api/admin/loanOrderApplyTown/addBlackList',
    method: 'post',
    data: obj
  });
}
// 定位信息
export function getLoanLonglatitudePage(query) {
  return fetch({
    url: '/api/admin/loanOrderApplyTown/getLoanLonglatitudePage',
    method: 'get',
    params: query
  });
}
// 注册信息 订单信息 借款需求 设备信息
export function getLoanInfo(query) {
  return fetch({
    url: '/api/admin/loanOrderApplyTown/getLoanInfo',
    method: 'get',
    params: query
  });
}
// 电核保存 
export function insertSelectiveTel(obj) {
  return fetch({
    url: '/api/admin/loanOrderApplyTown/insertSelectiveTel',
    method: 'post',
    data: obj
  });
}
// 添加备注
export function insertApprovalRemark(obj) {
  return fetch({
    url: '/api/admin/licenseController/insertApprovalRemark',
    method: 'post',
    data: obj
  });
}
// 回显备注
export function getApprovalRemark(query) {
  return fetch({
    url: '/api/admin/licenseController/getApprovalRemark',
    method: 'get',
    params: query
  });
}
// 拒绝原因
export function getRejectReason(query) {
  return fetch({
    url: '/api/admin/licenseController/getRejectReason',
    method: 'get',
    params: query
  });
}
// Adv身份认证
export function identityCheckResultizidata(query) {
  return fetch({
    url: '/api/admin/loanCommon/identityCheckResult',
    method: 'get',
    params: query
  });
}
// izidata在网时长
export function phoneAgeCheckResultizidata(query) {
  return fetch({
    url: '/api/admin/loanCommon/phoneAgeCheckResult',
    method: 'get',
    params: query
  });
}
// 机审拒绝原因
export function getRejectCodeByOrderId(query) {
  return fetch({
    url: 'api/admin/loanCommon/getRejectCodeByOrderId',
    method: 'get',
    params: query
  });
}
/**
 * 身份信息修改资料接口
 * @param {Object} data
 */
export function changeIdentityInfo(data) {
  return fetch({
    url: 'api/admin/loanOrderApplyTown/changeIdentityInfo',
    method: 'post',
    data
  })
}
/**
 * 工作信息与个人信息\借款需求 修改资料接口
 * @param {Object} data
 */
export function changeCustomerInfo(data) {
  return fetch({
    url: 'api/admin/loanOrderApplyTown/changeCustomerInfo',
    method: 'post',
    data
  })
}
/**
 * 修改紧急联系人
 * @param {Object} data
 */
export function changeContactsInfo(data) {
  return fetch({
    url: 'api/admin/loanOrderApplyTown/changeContactsInfo',
    method: 'post',
    data
  })
}
/**
 * 省市区四级联动
 * @param {Object} params
 */
export function getDivisionList(params) {
  return fetch({
    url: 'api/admin/loanOrderApplyTown/getDivisionList',
    method: 'get',
    params
  })
}
/**
 * 字段接口
 * @param {Object} params
 */
export function getDict(params) {
  const { code } = params
  // lg 中文=zh  英文=en   印尼文=yn
  // dictType  字典类型

  const p = {
    dictType: code,
    lg: Cookies.get('language') || 'zh'
  }
  return fetch({
    url: '/api/admin/loanCommon/getMsgDict',
    method: 'get',
    params: p
  })
}